﻿<Window x:Class="ClimateControl.Manager.View.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Server" Height="200" Width="200" ResizeMode="CanMinimize"
        Icon="pack://application:,,,/Climate Control Manager;component/Images/manager.ico">
    <Grid IsEnabled="{Binding State, Converter={StaticResource StateToBooleanConverter}}">
        <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">            
            <Button Content="Reset" Command="{Binding ResetCommand}" Width="50" Margin="0 5 0 0"/>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Air Con" Margin="0 0 5 0" />
                <CheckBox IsChecked="{Binding IsAirConOn}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Big Fan" Margin="0 0 5 0" />
                <CheckBox IsChecked="{Binding IsBigFanOn}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Temp " Width="40" />
                <TextBox Text="{Binding Temperature}" Width="35" Margin="0 0 5 0"/>
                <Button Command="{Binding SetTemperatureCommand}"  Content="Set" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Expiry " Width="40" />
                <TextBox Text="{Binding VoteExpiry}" Width="35" Margin="0 0 5 0"/>
                <Button Command="{Binding SetVoteExpiryCommand}"  Content="Set" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Freq " Width="40" />
                <TextBox Text="{Binding VoteFrequency}" Width="35" Margin="0 0 5 0"/>
                <Button Command="{Binding SetVoteFrequencyCommand}"  Content="Set" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Upd " Width="40" />
                <TextBox Text="{Binding UpdateFrequency}" Width="35" Margin="0 0 5 0"/>
                <Button Command="{Binding SetUpdateFrequencyCommand}"  Content="Set" />
            </StackPanel>

        </StackPanel>

    </Grid>
</Window>
